<?php
namespace App\Http\Controllers\Admin\Rivers;


use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests\Admin\UserRequest;
use \App\Http\Controllers\Admin\BaseController;

/**
 * 系统河道管理
 * Class RiversController
 * @package App\Http\Controllers\Admin\Rivers
 */

class RiversController extends BaseController 
{
    protected $service;

    public function __construct(RiversService $service)
    {
        parent::__construct();
        $this->service = $service;
    }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        // $username = $this->service->getManagerRivers();
        $result = $this->service->index();
        return request()->ajax() ? $result : view('themes.admin.rivers.index')->with($result);
    }
}